#include <Ice/Application.h>
#include <Yafridng.h>

using namespace std;
using namespace Ice;
using namespace Yafridng;

class FileI
  : public File
{
public:
  
 FileI(FILE* fp, int num, int pieceSize) :
    _fp(fp),
    _num(num),
    _pieceSize(pieceSize),
    _bytes(new Ice::Byte[num])
  {
  }

  ~FileI()
  {
    delete[] _bytes;
  }
  
  virtual void next_async(const ::Yafridng::AMD_File_nextPtr&, const ::Ice::Current&);

private:

  FILE* _fp;
  const int _num;
  int _pieceSize;
  Ice::Byte* _bytes;  
};
